<%@page contentType="text/html"%>
<%@page pageEncoding="UTF-8"%>
<%@ page session="true" %>
<%@ page import="javax.portlet.*" %>
<%@page import ="rai.dto.*" %>
<%@page import ="rai.dao.*" %>
<%@page import = "java.util.*" %>

<%@ taglib uri="http://java.sun.com/portlet" prefix="portlet"%>
<%@ taglib uri="http://java.sun.com/jstl/core" prefix="c"%>
<portlet:defineObjects/>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>Personal Information Tracking System</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<script type="text/javascript" src='<%= request.getContextPath() + "/js/calendarDateInput.js" %>'></script>
<script type="text/javascript">
    function getForm(namespace, name) {
        return document.forms[namespace + name];
    }
    function back_to_emp_info_form(namespace, name) {
        var frm = getForm(namespace, name);
        frm.txtAction.value = "back_to_empInfo_form_2";
        frm.submit();
    }
    function back_to_login(namespace, name) {
		var frm = getForm(namespace, name);
		frm.txtAction.value = "back_to_login_form";
		frm.submit();
	}
	function update_taken_prj_info(namespace,name){
		var frm = getForm(namespace, name);
		frm.txtAction.value = "update_taken_prj_info";
		frm.submit();
	}
</script>
<link href='<%=request.getContextPath() + "/css/style.css" %>' rel="stylesheet" type="text/css" media="screen" />
</head>
<body>
<form>
<table>

	<tr>	
		<td>
			<table border="1">
				<tr>
					<td><h2 class="title">Project  Information</h2></td>

				</tr>
					
				<tr>
					<td><p><em>General Information </em></p></td>
				</tr>
				<tr>
					<td>
						<table border="1" width="100%">							
							<tr>
							  <td align="left" valign="bottom">&nbsp;Project Name</td>

							  <td align="left" valign="middle" colspan="3"><input type="text" name="textfield2" /></td>							  							 						  </tr><tr>
							  <td align="left" valign="bottom">&nbsp;Project's Description&nbsp;</td>
							  <td align="left" valign="middle" colspan="3"><textarea name="textarea"></textarea></td>							  							</tr>
							<tr>
							  <td align="left" valign="bottom">&nbsp;Company&nbsp;</td>
							  <td align="left" valign="middle">

								  <select name="select6">
									<option value="1">FPT Software</option>
									<option value="1">TMA</option>
								  </select>							  </td>							
							  <td colspan="2" align="left" valign="middle">Department
								  <select name="select" onchange="if(this.value=='Other'){
														this.form.otherDepart.style.visibility='visible';
														this.form.otherDepart.focus();}
												else{this.form.otherDepart.style.visibility='hidden';}">
									<option value="1">G33</option>
									<option value="1">G36</option>

									<option value="1">G6</option>
									<option value="1">RAI</option>
									<option value="Other">Other</option>
								</select>
							  <input name="otherDepart" type="text" style="visibility:hidden" />							  </td>  
						  </tr>
							<tr>

							  <td align="left" valign="middle" rowspan="2">&nbsp;Project's Period&nbsp;</td>
							  <td align="left" valign="bottom">From</td>
							  <td align="left" valign="middle" colspan="2">&nbsp;

										<script>
											DateInput('periodFrom', true, 'DD/MM/YYYY');
										</script>							  </td>  							 
						  </tr>
						  <tr>
							  	<td align="left" valign="bottom">&nbsp;To&nbsp;</td>

						  		<td align="left" valign="middle" colspan="2">&nbsp;
										<script>
											DateInput('periodTo', true, 'DD/MM/YYYY');
										</script>							  </td>
						  </tr>
						  <tr>
							  	<td align="left" valign="bottom">&nbsp;Size&nbsp;</td>
						  		<td colspan="3" align="left" valign="middle"><input type="text" name="textfield" /></td>
						  </tr>

						  <tr>
							  <td align="left" valign="bottom" colspan="4"><em>&nbsp;Technology Information&nbsp;</em></td>							  
						  </tr>
						  <tr>
							  <td align="left" valign="bottom">&nbsp;Language&nbsp;</td>
							  <td align="left" valign="bottom"><textarea name="projectLang" rows="1"></textarea></td>
							  <td align="left" valign="bottom">								  
								  <select name="select2" 
								  		onchange="if(this.value=='Other'){
														this.form.otherLang.style.visibility='visible';
														this.form.otherLang.focus();}
												else{this.form.otherLang.style.visibility='hidden';}"
														>

                                    <option value="Java">Java</option>
                                    <option value="C++">C++</option>
                                    <option value="C#">C#</option>
                                    <option value="Delphi">Delphi</option>
                                    <option value="Other">Other</option>
                                  </select>

						    <input name="otherLang" type="text" style="visibility:hidden" />								</td>
								<td align="left" valign="bottom">					    
						    <input name="addLang" type="button" value="Add" 
								  			onclick="
													if(this.form.select2.value!='Other'){
														if(this.form.projectLang.value==''){
															this.form.projectLang.value = this.form.select2.value;
														} else{
															this.form.projectLang.value = this.form.projectLang.value+', '+this.form.select2.value;
														}
													}else{
														if(this.form.projectLang.value==''){
															this.form.projectLang.value = this.form.otherLang.value;
														} else{
															this.form.projectLang.value = this.form.projectLang.value+', '+this.form.otherLang.value;
														}
													}
													"/>								</td>
						  </tr>
						  <tr>
							  <td align="left" valign="bottom">&nbsp;Type of Application &nbsp;</td>
							  <td align="left" valign="bottom"><textarea name="projectApp" rows="1"></textarea></td>

							  <td align="left" valign="bottom">	
							  <select name="select3"
							  					onchange="if(this.value=='Other'){
																this.form.otherApp.style.visibility='visible';
																this.form.otherApp.focus();}
															else{this.form.otherApp.style.visibility='hidden';}"
									>
							    <option value="Web">Web Application</option>
							    <option value="Desktop">Desktop Application</option>
							    <option value="Mobile">Mobile Application</option>
							    <option value="Embedded">Embedded Application</option>
							    <option value="Other">Other Application</option>

                                </select>
						    <input name="otherApp" type="text" style="visibility:hidden" />								</td>
								<td align="left" valign="bottom">
						    <input name="addApp" type="button" value="Add" 
								  			onclick="
													if(this.form.select3.value!='Other'){
														if(this.form.projectApp.value==''){
															this.form.projectApp.value = this.form.select3.value;
														} else{
															this.form.projectApp.value = this.form.projectApp.value+', '+this.form.select3.value;
														}
													} else {
														if(this.form.projectApp.value==''){
															this.form.projectApp.value = this.form.otherApp.value;
														} else{
															this.form.projectApp.value = this.form.projectApp.value+', '+this.form.otherApp.value;
														}
													}
													"/>							</td>
						  </tr>
						  <tr>
							  <td align="left" valign="bottom">&nbsp;Kind of Technology&nbsp;</td>

							  <td align="left" valign="bottom"><textarea name="projectTech" rows="1"></textarea></td>
							  <td align="left" valign="bottom">
							  		<select name="select4" onchange="if(this.value=='Other'){
																this.form.otherTech.style.visibility='visible';
																this.form.otherTech.focus();}
															else{this.form.otherTech.style.visibility='hidden';}"
									>
							  		  <option value="J2EE">J2EE</option>
							  		  <option value="J2SE">J2SE</option>
							  		  <option value="Java Networking">Java Networking</option>
							  		  <option value="Java XML">Java XML</option>

							  		  <option value="EJB">EJB</option>
							  		  <option value="Servlet">Servlet</option>
							  		  <option value="Other">Other</option>
                              		</select>
							  		<input name="otherTech" type="text" style="visibility:hidden" />								</td>
								<td align="left" valign="bottom">
							<input name="addTech" type="button" value="Add" 
								  			onclick="
													if(this.form.select4.value!='Other'){
														if(this.form.projectTech.value==''){
															this.form.projectTech.value = this.form.select4.value;
														} else{
															this.form.projectTech.value = this.form.projectTech.value+', '+this.form.select4.value;
														}
													} else {
														if(this.form.projectTech.value==''){
															this.form.projectTech.value = this.form.otherTech.value;
														} else{
															this.form.projectTech.value = this.form.projectTech.value+', '+this.form.otherTech.value;
														}
													}
													"/>								</td>

						  </tr>
						  <tr>
							  <td align="left" valign="bottom">&nbsp;Kind of Framework &nbsp;</td>
							  <td align="left" valign="bottom"><textarea name="projectFw" rows="1"></textarea></td>
							  <td align="left" valign="bottom">
							  	  <select name="select5" onchange="if(this.value=='Other'){
																this.form.otherFw.style.visibility='visible';
																this.form.otherFw.focus();}
															else{this.form.otherFw.style.visibility='hidden';}"
									>
								    <option value="Struts">Struts</option>

								    <option value="Spring">Spring</option>
								    <option value="Hibernate">Hibernate</option>
								    <option value="Other">Other</option>
								  </select>
								  <input name="otherFw" type="text" style="visibility:hidden" />								  </td>
								<td align="left" valign="bottom">
							<input name="addFw" type="button" value="Add" 
								  			onclick="
													if(this.form.select5.value!='Other'){
														if(this.form.projectFw.value==''){
															this.form.projectFw.value = this.form.select5.value;
														} else{
															this.form.projectFw.value = this.form.projectFw.value+', '+this.form.select5.value;
														}
													} else {
														if(this.form.projectFw.value==''){
															this.form.projectFw.value = this.form.otherFw.value;
														} else{
															this.form.projectFw.value = this.form.projectFw.value+', '+this.form.otherFw.value;
														}
													}
													"/>							</td>

						  </tr>

						  <tr align="left" valign="bottom">
						  	  <td colspan="5"><input type="button" name="Button2" value="Update" /><input type="button" name="Button2" value="Cancel" /></td>
						  </tr>
				    </table>					</td>
				</tr>
			</table>			
		</td>

	</tr>
	<tr>
		<td colspan="2">
			&nbsp;</td>
	</tr>
</table>
</form>
</body>
</html>
